package com.wlw.admin.openeye.api

import com.wlw.admin.openeye.mvp.model.bean.CategoryBean
import com.wlw.admin.openeye.mvp.model.bean.HomeBean
import com.wlw.admin.openeye.mvp.model.bean.TabInfoBean
import io.reactivex.Observable
import retrofit2.http.GET
import retrofit2.http.Query
import retrofit2.http.Url

interface ApiService {
    @GET("v2/feed?")
    fun getFirstHomeData(@Query("num") num: Int): Observable<HomeBean>

    @GET
    fun getMoreData(@Url url: String): Observable<HomeBean>

    @GET("v4/video/related?")
    fun getRelatedData(@Query("id") id: Long): Observable<HomeBean.Issue>

    @GET("v4/categories")
    fun getCategory(): Observable<ArrayList<CategoryBean>>

    @GET("v4/categories/videoList")
    fun getCategoryDetailList(@Query("id") id: Long): Observable<HomeBean.Issue>

    @GET("v4/rankList")
    fun getRankList(): Observable<TabInfoBean>


    @GET("v3/queries/hot")
    fun getHotWord(): Observable<ArrayList<String>>

    @GET("v1/search?num=10&start=10")
    fun getSearchData(@Query("query") query: String): Observable<HomeBean.Issue>

    /**
     * 获取更多的 Issue
     */
    @GET
    fun getIssueData(@Url url: String): Observable<HomeBean.Issue>

    /**
     *关注
     */
    @GET("v4/tabs/follow")
    fun getFollowInfo(): Observable<HomeBean.Issue>
}